home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
4.2
/
arexx
/
editor
/
prepstills.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-04-16
|
3KB
|
115 lines
/* PrepStills.rexx V3.0 -- Change still and framestore duration. */
/* By Bob Caron (Grue) ©1995 NewTek Inc. (Suggested by Azar) */
arg frompopup
if frompopup="" then frompopup=0
call remlib('PROJECT_REXX_PORT')
call addlib('PROJECT_REXX_PORT',0)
call set_view(2)
call req_error("Prep Stills V3.0 --- Batch change flyer stills & Framestore duration in a project (Time is in seconds).")
done=0
do while done=0
selection=req_tell("Prep Stills V3.0","'Continue' to effect ALL croutons","'Cancel' to effect selected croutons")
done=1
if selection=0 & frompopup=0 then do
if req_tell("Error:","You can only use this feature if you","launch this script from the tools","popup menu.")=0 then call quit()
done=0
end
end
if selection=1 then frompopup=0 else frompopup=1
project_end=croutonsinproject()
location=1
do count=1 to project_end
if croutonselectedpos(count)=1 | frompopup=0 then do
selected.location=count-1
location=location+1
end
end
location=location-1
time=req_time("Enter duration",30)
if time="CANCEL" then call quit()
hours=substr(time,1,2)
minutes=substr(time,4,2)
seconds=substr(time,7,2)
frames=substr(time,10,2)
fields=D2F((hours*216000)+(minutes*3600)+(seconds*60)+(frames*2))
stuff=-1;framestores=0;stills=0
buttons='11'
do while stuff=-1
buttons=req_buttons("Choose type:",buttons,"Flyer Stills","Framestores")
if buttons="CANCEL" then call quit
if buttons="10" then do
stills=1
stuff=1
end
if buttons="01" then do
framestores=1
stuff=1
end
if buttons="11" then do
framestores=1
stills=1
stuff=1
end
end
if frompopup="0" then do
if req_tell("Change ALL Framestores/Stills"," Are You Sure?")=0 then call quit()
end
else
if req_tell("Change Selected Framestores/Stills."," Are You Sure?")=0 then call quit()
call req_open("Working... Please wait.")
chunk=100/location;last=0;dots=0
do count=1 to location
if (crnumtype(selected.count)="STIL" & stills=1) | (crnumtype(selected.count)="FRAM" & framestores=1) then do
call crnumsettag(selected.count,Duration,fields)
end
last=trunc(dots/10)+1
dots=dots+chunk;string=copies(".",trunc(dots/10)+1)
if (last~=trunc(dots/10)+1) then do
if (11-length(string)>-1) then
call req_error("[Working"||string||right(' ',11-length(string))||"]")
end
end
call req_close()
call req_error("All done.")
call projectupdate()
call remlib("PROJECT_REXX_PORT")
exit
quit:
call req_error("Canceled.")
call remlib("PROJECT_REXX_PORT")
exit
croutonselectedpos:
arg pos
row=trunc(pos/8)
col=pos-(row*8)
row=row+1
return croutonselected(row,col)
D2F: procedure /* Convert dropframe to fields */
parse arg ticks
mins=ticks%1800
if (ticks>0) then return( ticks - (mins*2) + 2*(mins%10) )
return(0) /* Dropframe is a major PAIN!!! */
}